﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using Microsoft.Practices.Unity;
using ShellAnywhere.Model;

using ShellAnywhere.View;
using ShellAnywhere.ViewModel;
using System.Diagnostics;

namespace ShellAnywhere
{
	/// <summary>
	/// Interaction logic for App.xaml
	/// </summary>
	public partial class App : Application
	{
		#region ctors
		#endregion ctors

		#region props
		#endregion props

		#region methods
		protected override void OnStartup(StartupEventArgs e)
		{
			base.OnStartup(e);

			IUnityContainer container = new UnityContainer();

			IShellAnywhereModel model = new ShellAnywhereModel();
			DispatchingShellAnywhereModel dispatching = new DispatchingShellAnywhereModel(model);

			container.RegisterInstance<IShellAnywhereModel>(dispatching);
			try
			{
				ShellAnywhereView window = container.Resolve<ShellAnywhereView>();
				window.Show();
			}
			catch (Exception ex)
			{
				Debug.WriteLine(ex.Message);
			}
		}
			

		#endregion methods

		#region events
		#endregion events

		#region fields
		#endregion fields
	}
}
